// /zhaokao-info/page

import { post, get } from '@/common/http/request';
import request from '@/common/http/axios';

// /admin/upms/globalDict/listAll?dictCode=zhaokaoType get

export const getDict = dictCode => {
  // return get(`/admin/upms/globalDict/listAll?dictCode=${dictCode}`);
  return request({
    url: '/admin/upms/globalDict/listAll',
    params: {
      dictCode,
    },
  });
};

export const getZhaokaoInfo = params => {
  // return post('/zhaokao-info/page', params);
  return request({
    url: '/zhaokao-info/page',
    method: 'post',
    data: params,
  });
};

// /zhaokao-info/delete/{id}
export const deleteZhaokaoInfo = id => {
  // return post(`/zhaokao-info/delete/${id}`);
  return request({
    url: `/zhaokao-info/delete/${id}`,
    method: 'post',
  });
};

// /zhaokao-info/create
export const createZhaokaoInfo = params => {
  return request({
    url: '/zhaokao-info/create',
    method: 'post',
    data: params,
  });
};

// /zhaokao-info/admin/get/{id}
export const getZhaokaoInfoById = id => {
  if (!id) {
    return Promise.resolve({});
  }
  return request({
    url: `/zhaokao-info/admin/get/${id}`,
    method: 'get',
  });
};
// /admin/upms/sysUser/customlist
export const getUserList = () => {
  return request({
    url: '/admin/upms/sysUser/customlist',
    method: 'get',
  });
};

// /zhaokao/provinceImages/add
export const addProvinceImage = params => {
  return request({
    url: '/zhaokao/provinceImages/add',
    method: 'post',
    data: params,
  });
};
// zhaokao/provinceImages/admin/list
export const getProvinceImages = params => {
  return request({
    url: '/zhaokao/provinceImages/admin/list',
    method: 'get',
    params,
  });
};
// /zhaokao/provinceImages/delete
export const deleteProvinceImage = id => {
  return request({
    url: `/zhaokao/provinceImages/delete?id=${id}`,
    method: 'get',
  });
};

export const getFeedbackCorrectionList = params => {
  return request({
    url: '/feedback-correction/list',
    method: 'post',
    data: params,
  });
};


// feedback-correction/update-status
export const updateFeedbackCorrectionStatus = params => {
  return request({
    url: '/feedback-correction/update-status',
    method: 'post',
    data: params,
  });
};
